{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# touzizhidao_filter 说明\n",
    "0. **下载地址：** [百度网盘](https://pan.baidu.com/s/1SR5d20DPpU7F1h_OVf64GA)\n",
    "1. **数据概览：** 58.8 万条投资行业问答数据\n",
    "2. **推荐实验：** FAQ 问答系统\n",
    "3. **数据来源：** 百度知道\n",
    "4. **加工处理：**\n",
    "    1. 过滤了id、url、qid、reply_t、user字段\n",
    "    2. 对question、reply做了脱敏处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "path = 'touzizhidao_文件夹_所在_路径'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. touzizhidao_filter.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "pd_all = pd.read_csv(path + 'touzizhidao_filter.csv')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 字段说明\n",
    "\n",
    "| 字段 | 说明 |\n",
    "| ---- | ---- |\n",
    "| title | 问题的标题 |\n",
    "| question | 问题内容（可为空） |\n",
    "| reply| 回复内容 |\n",
    "| is_best| 是否为页面上显示的最佳回答 |"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>question</th>\n",
       "      <th>reply</th>\n",
       "      <th>is_best</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>133637</th>\n",
       "      <td>华夏银行信用卡怎么查询申请进度</td>\n",
       "      <td>NaN</td>\n",
       "      <td>信用卡申请进度查询：查询步骤：一、网银查询：1、登录银行信用卡中心页面，然后点击“办卡进度查...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>295236</th>\n",
       "      <td>我向上海复星投资创业有限公司申请贷款要交1000元保险开户费，交了</td>\n",
       "      <td>我向上海复星投资创业有限公司申请贷款要交1000元保险开户费，交了过后又说我银行卡不行还要交...</td>\n",
       "      <td>我的不用</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>329332</th>\n",
       "      <td>二手房买卖中介收费是多少二手房买卖中介如何收费</td>\n",
       "      <td>NaN</td>\n",
       "      <td>二手房交易流程(1)买方咨询买卖双方建立信息沟通渠道，买方了解房屋整体现状及产权状况，要求卖...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>176871</th>\n",
       "      <td>单位给职工办的社保卡买药里面资金不足怎么办</td>\n",
       "      <td>单位给职工办的社保卡买药里面资金不足怎么办</td>\n",
       "      <td>不足的部分需要自己支付医保卡的使用范围主要有以下三个方面：1、用于购药：参保人员在定点药店买...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>485667</th>\n",
       "      <td>银联医保卡去哪家银行激活。</td>\n",
       "      <td>NaN</td>\n",
       "      <td>医保卡上面的银行医保卡激活的步骤：1、带着老卡和新卡到建设银行办理；2、新医保卡的密码是身份...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5012</th>\n",
       "      <td>买一套大概150万的二手门面房大概要交多少钱</td>\n",
       "      <td>NaN</td>\n",
       "      <td>如果购买的是非普通住宅，除了缴纳房屋费用，还需要按以下规定缴纳相关税费：（1）增值税：非住宅...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>475672</th>\n",
       "      <td>二手房买卖，公共维修基金应怎么处理？是需要下家支付给上家账面余额，还是无偿顺延呢？</td>\n",
       "      <td>买卖合同中是这样写的：“出卖人同意其缴纳的该房屋专项维修资金（公共维修基金）的账面余额转移至...</td>\n",
       "      <td>需要办理维修基金过户。无偿顺延就可以。维修基金使用条件：1、维修基金只有在保修期满后，对物业...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199291</th>\n",
       "      <td>信用卡全额还款好还是最低还款好</td>\n",
       "      <td>NaN</td>\n",
       "      <td>如果条件可以，当然是全额还款好，最低还款是要付利息的，而且还有点高，银行当然希望是最低还款，...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>265499</th>\n",
       "      <td>花呗如何才能提额</td>\n",
       "      <td>花呗怎样才能提高额度</td>\n",
       "      <td>花呗额度取决于芝麻信用分，若要提升额度，需要先提升芝麻信用分，提升芝麻信用分小技巧：1、多在...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>224237</th>\n",
       "      <td>工行信用卡逾期两个月，没有90天！！</td>\n",
       "      <td>工行信用卡逾期两个月，没有90天！！银行把卡冻结了，欠款7000，全部还清以后打电话解冻，客...</td>\n",
       "      <td>可以用，但额度只有2000元，且征信上有逾期记录注销吧</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>271023</th>\n",
       "      <td>中*房价什么时候会大跌</td>\n",
       "      <td>NaN</td>\n",
       "      <td>我感觉房价下降的几率比较小，现在啥都涨价，国家再调控，也不可能让我这月收入几千块钱的人买得起...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14097</th>\n",
       "      <td>在四*地*，个人所得税达到多少金额</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人所得税征税内容工资、薪金所得,个体工商户的生产、经营所得,他有偿服务活动取得的所得。经营...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>363978</th>\n",
       "      <td>关于贷款的</td>\n",
       "      <td>关于贷款的有没有什么借款途径</td>\n",
       "      <td>有口子。</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>517939</th>\n",
       "      <td>农村建房可以贷款吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>不可以，银行贷款一般是能够上市交易的房子。贷款需要准备四大类资料：1、个人身份证明：身份证、...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>505671</th>\n",
       "      <td>2017年甘*个人医保卡能让别人用吗</td>\n",
       "      <td>NaN</td>\n",
       "      <td>个人医保卡是不能让别人使用的。医保卡（社保卡）只限本人就医时使用，不能出借给他人。参保人如把...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117318</th>\n",
       "      <td>别墅好还是高层好</td>\n",
       "      <td>别墅好还是高层好</td>\n",
       "      <td>别墅。还是看你自己的需要还有经济能力了不是房子建的好看就算是别墅的。别墅即别野，讲究的是周围...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>376669</th>\n",
       "      <td>新车什么时候算上户了也就说法律上属于自己的财产</td>\n",
       "      <td>NaN</td>\n",
       "      <td>购房合同签订完了车子就属于个人财产了。中*人*共*国*法通则第七十五条规定：个人财产所有权包...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>179097</th>\n",
       "      <td>农民59岁买什么养老</td>\n",
       "      <td>农民59岁买什么养老</td>\n",
       "      <td>多存点钱。</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>77847</th>\n",
       "      <td>支付宝转账手续费怎么收的</td>\n",
       "      <td>NaN</td>\n",
       "      <td>好想是一个月内不能超过5万没有手续费你好，每个支付宝账户有两万元的免费提现和转账额度，提现和...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319220</th>\n",
       "      <td>甘*省企业退休人员养老金怎么调整</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2016年，我国实现了企业和机关事业单位养老金待遇同步调整，按6.5%左右提高企业和机关事业...</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                            title  \\\n",
       "133637                            华夏银行信用卡怎么查询申请进度   \n",
       "295236          我向上海复星投资创业有限公司申请贷款要交1000元保险开户费，交了   \n",
       "329332                    二手房买卖中介收费是多少二手房买卖中介如何收费   \n",
       "176871                      单位给职工办的社保卡买药里面资金不足怎么办   \n",
       "485667                              银联医保卡去哪家银行激活。   \n",
       "5012                       买一套大概150万的二手门面房大概要交多少钱   \n",
       "475672  二手房买卖，公共维修基金应怎么处理？是需要下家支付给上家账面余额，还是无偿顺延呢？   \n",
       "199291                            信用卡全额还款好还是最低还款好   \n",
       "265499                                   花呗如何才能提额   \n",
       "224237                         工行信用卡逾期两个月，没有90天！！   \n",
       "271023                                中*房价什么时候会大跌   \n",
       "14097                           在四*地*，个人所得税达到多少金额   \n",
       "363978                                      关于贷款的   \n",
       "517939                                  农村建房可以贷款吗   \n",
       "505671                         2017年甘*个人医保卡能让别人用吗   \n",
       "117318                                   别墅好还是高层好   \n",
       "376669                    新车什么时候算上户了也就说法律上属于自己的财产   \n",
       "179097                                 农民59岁买什么养老   \n",
       "77847                                支付宝转账手续费怎么收的   \n",
       "319220                           甘*省企业退休人员养老金怎么调整   \n",
       "\n",
       "                                                 question  \\\n",
       "133637                                                NaN   \n",
       "295236  我向上海复星投资创业有限公司申请贷款要交1000元保险开户费，交了过后又说我银行卡不行还要交...   \n",
       "329332                                                NaN   \n",
       "176871                              单位给职工办的社保卡买药里面资金不足怎么办   \n",
       "485667                                                NaN   \n",
       "5012                                                  NaN   \n",
       "475672  买卖合同中是这样写的：“出卖人同意其缴纳的该房屋专项维修资金（公共维修基金）的账面余额转移至...   \n",
       "199291                                                NaN   \n",
       "265499                                         花呗怎样才能提高额度   \n",
       "224237  工行信用卡逾期两个月，没有90天！！银行把卡冻结了，欠款7000，全部还清以后打电话解冻，客...   \n",
       "271023                                                NaN   \n",
       "14097                                                 NaN   \n",
       "363978                                     关于贷款的有没有什么借款途径   \n",
       "517939                                                NaN   \n",
       "505671                                                NaN   \n",
       "117318                                           别墅好还是高层好   \n",
       "376669                                                NaN   \n",
       "179097                                         农民59岁买什么养老   \n",
       "77847                                                 NaN   \n",
       "319220                                                NaN   \n",
       "\n",
       "                                                    reply  is_best  \n",
       "133637  信用卡申请进度查询：查询步骤：一、网银查询：1、登录银行信用卡中心页面，然后点击“办卡进度查...        1  \n",
       "295236                                               我的不用        0  \n",
       "329332  二手房交易流程(1)买方咨询买卖双方建立信息沟通渠道，买方了解房屋整体现状及产权状况，要求卖...        1  \n",
       "176871  不足的部分需要自己支付医保卡的使用范围主要有以下三个方面：1、用于购药：参保人员在定点药店买...        1  \n",
       "485667  医保卡上面的银行医保卡激活的步骤：1、带着老卡和新卡到建设银行办理；2、新医保卡的密码是身份...        1  \n",
       "5012    如果购买的是非普通住宅，除了缴纳房屋费用，还需要按以下规定缴纳相关税费：（1）增值税：非住宅...        1  \n",
       "475672  需要办理维修基金过户。无偿顺延就可以。维修基金使用条件：1、维修基金只有在保修期满后，对物业...        0  \n",
       "199291  如果条件可以，当然是全额还款好，最低还款是要付利息的，而且还有点高，银行当然希望是最低还款，...        1  \n",
       "265499  花呗额度取决于芝麻信用分，若要提升额度，需要先提升芝麻信用分，提升芝麻信用分小技巧：1、多在...        0  \n",
       "224237                        可以用，但额度只有2000元，且征信上有逾期记录注销吧        0  \n",
       "271023  我感觉房价下降的几率比较小，现在啥都涨价，国家再调控，也不可能让我这月收入几千块钱的人买得起...        0  \n",
       "14097   个人所得税征税内容工资、薪金所得,个体工商户的生产、经营所得,他有偿服务活动取得的所得。经营...        1  \n",
       "363978                                               有口子。        0  \n",
       "517939  不可以，银行贷款一般是能够上市交易的房子。贷款需要准备四大类资料：1、个人身份证明：身份证、...        1  \n",
       "505671  个人医保卡是不能让别人使用的。医保卡（社保卡）只限本人就医时使用，不能出借给他人。参保人如把...        1  \n",
       "117318  别墅。还是看你自己的需要还有经济能力了不是房子建的好看就算是别墅的。别墅即别野，讲究的是周围...        0  \n",
       "376669  购房合同签订完了车子就属于个人财产了。中*人*共*国*法通则第七十五条规定：个人财产所有权包...        1  \n",
       "179097                                              多存点钱。        0  \n",
       "77847   好想是一个月内不能超过5万没有手续费你好，每个支付宝账户有两万元的免费提现和转账额度，提现和...        0  \n",
       "319220  2016年，我国实现了企业和机关事业单位养老金待遇同步调整，按6.5%左右提高企业和机关事业...        1  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd_all.sample(n=20)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
